Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'google_organization' data source #887

Merged
merged 5 commits into from
Dec 22, 2017
Merged

Add 'google_organization' data source #887

merged 5 commits into from
Dec 22, 2017

Conversation

ewbankkit
Copy link
Contributor

Fixes #886.

@ewbankkit
Copy link
Contributor Author

make testacc TEST=./google/ TESTARGS='-run=TestAccDataSourceGoogleOrganization_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./google/ -v -run=TestAccDataSourceGoogleOrganization_ -timeout 120m
=== RUN   TestAccDataSourceGoogleOrganization_basic
--- PASS: TestAccDataSourceGoogleOrganization_basic (0.97s)
PASS
ok  	github.com/terraform-providers/terraform-provider-google/google	0.974s

@rosbo rosbo self-assigned this Dec 21, 2017
Copy link
Contributor

@rosbo rosbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good. A few small comments and we should be good to merge. Thank you

return fmt.Errorf("Invalid organization name. Expecting organizations/{organization_id}")
}

d.SetId(parts[1])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed as suggested.

"google.golang.org/api/cloudresourcemanager/v1"
)

func getResourceName(resourceId *cloudresourcemanager.ResourceId) string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any usage for this method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this code must have come from something else I was noodling on. Removed those 2 source files.

@ewbankkit
Copy link
Contributor Author

ewbankkit commented Dec 21, 2017

I'm going to make some additional changes based on review comments in #889 - use ConflictsWith in the schema and add an organization argument that can be specified as either {organization_id} or organizations/{organization_id}.

Copy link
Contributor

@rosbo rosbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Merging

@rosbo rosbo merged commit 49a0008 into hashicorp:master Dec 22, 2017
@ewbankkit ewbankkit deleted the google_organization-data-source branch January 8, 2018 15:28
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
* Add 'google_organization' data source.

* Use 'GetResourceNameFromSelfLink'.

* Remove 'resourcemanager_helpers'.

* Use 'ConflictsWith' in schema.

* Add 'organization' argument and make 'name' an output-only attribute.
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this pull request Sep 27, 2019
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost unassigned rosbo Mar 30, 2020
@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New data source: Organization
2 participants